onload = () => {
    let addClickLink = (element, link) => {
        element.css({
            "cursor": "pointer",
            "transition": "all .5s",
        });
        let mousedownX, mousedownY;
        let mouseupX, mouseupY;
        element.mousedown((e) => {
            mousedownX = e.offsetX;
            mousedownY = e.offsetY;
        });
        element.mouseup((e) => {
            mouseupX = e.offsetX;
            mouseupY = e.offsetY;
            if (Math.abs(mousedownX - mouseupX) < 10 && Math.abs(mousedownY - mouseupY) < 10) {
                location.href = "../../" + link;
            }
        });
    };

    addClickLink($(".mask"), "main/headline/variety.html");

    addClickLink($("#info"), "main/headline/info.html");

    addClickLink($("#honors"), "main/develop/digital.html");

    addClickLink($("#general"), "main/develop/industry.html");

    addClickLink($("#icons"), "main/headline/scene.html");

    $("#fullpage").fullpage({});
}